﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Nav">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary
            Source="/Nav;Component/Themes/Common.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style
        TargetType="local:NavigationMenuItem">
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="local:NavigationMenuItem">

                    <Border
                        BorderThickness="5,5,5,5"
                        CornerRadius="2,2,2,2"
                        Margin="0,0,0,0"
                        Padding="1,1,1,1"
                        BorderBrush="{StaticResource MenuItemBorder}"
                        VerticalAlignment="Top"
                        Height="58"
                        Background="{StaticResource MenuItemBackground}">
                        
                        <Grid
                            Margin="0,0,0,0"
                            VerticalAlignment="Stretch">
                            
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition
                                    Width="41.5" />
                                <ColumnDefinition
                                    Width="*" />
                            </Grid.ColumnDefinitions>
                            
                            <Border
                                Grid.Column="0"
                                BorderThickness="0"
                                Width="41.5"
                                Background="{StaticResource MenuIconContainerBackround}"
                                HorizontalAlignment="Left">

                                <Image
                                    Source="{Binding Icon}"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center"/>
                            </Border>
                            
                            <TextBlock
                                Grid.Column="1"
                                TextWrapping="Wrap"
                                HorizontalAlignment="Left"
                                Width="Auto"
                                VerticalAlignment="Center"
                                Margin="3,3,3,3"
                                Text="{Binding Name}">
                            </TextBlock>
                            
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>
